package com.iraeta.controller.basic;

import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.iraeta.controller.BaseController;
import com.iraeta.entity.main.Busslog;
import com.iraeta.service.basic.BusslogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController(value = "BussLogController")
@RequestMapping("busslog")
public class BussLogController extends BaseController {
    @Autowired
    BusslogService busslogService;

    @RequestMapping("pagewuliaotongbulog")
    public String pageWuLiaoTongBuLog(@RequestBody JSONObject jo){
        this.pageSet(jo);
        List<Busslog> busslogList = busslogService.selectByBussName("wuliaotongbu");
        PageInfo<Busslog> busslogPageInfo = this.getPageInfo(busslogList);
        return this.success(busslogPageInfo);
    }
}
